import Vue from 'vue';
import main from './main.vue';
let VideoConstructor = Vue.extend(main);
let instance = [];

var createVideoBox = function(dom, data) {
  const video = new VideoConstructor({ data: data });
  video.$mount();
  dom.appendChild(video.$el);
  instance.push(video);
  instance.map((item) => {
    item.pause();
  });

  return instance;
};
export default createVideoBox;
